package com.csun.cmny.provider.service;

import com.csun.cmny.provider.dto.SetMealSaveParameterDto;
import com.csun.cmny.provider.pojo.OldmanNurseHi;
import com.csun.cmny.provider.vo.SetMealSaveItemVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author huangxm
 * @description:
 * @date 2019/3/27 14:13
 */
public interface OldmanNurseHiService {

    int deleteByPrimaryKey(Integer historyId);

    int insert(OldmanNurseHi record);

    int insertNew(SetMealSaveParameterDto setMealSaveParameterDto);

    int insertAddItem(SetMealSaveItemVo setMealSaveItemVo);

    List<SetMealSaveParameterDto> selectAll(Map<String,Object> queryMap);

    SetMealSaveParameterDto selectByIdDay(Map<String,Object> queryMap);

    List<SetMealSaveItemVo> selectItem(Map<String,Object> map);

    int deleteItemById(Map<String,Object> map);

    int deleteAllById(Map<String,Object> map);

    int deleteAll(Map<String,Object> map);

    int insertSelective(OldmanNurseHi record);

    OldmanNurseHi selectByPrimaryKey(Integer historyId);

    int updateByPrimaryKeySelective(OldmanNurseHi record);

    int updateByPrimaryKey(OldmanNurseHi record);

    /**
     * 根据老人ID查询所有护理记录
     * @param oldmanId
     * @return
     */
    List<OldmanNurseHi> getAllHistoryByOldmanId(Integer oldmanId);

    /**
     * 根据老人ID删除所有护理记录
     * @param oldmanId
     * @return
     */
    int deleteByOldmanId( Integer oldmanId);

    OldmanNurseHi selectRecentNurse(@Param("oldmanId") Integer oldmanId);
}
